new Vue({
	el:"#products",
	data:{
		message:"请求数据"
	},
	mounted() {
		axios
			.get('json/new_file.json')
			.then(response => this.message = response.data.link)
			.catch(function(error) {
				console.log(error);
			})
	}
})


new Vue({
	el:"#li",
	data:{
		message:"请求数据"
	},
	mounted(){
		axios
			.get('json/new_file.json')
			.then(response => this.message = response.data.urls)
			.catch(function(error){
				console.log(error);
			})
	}
})


//选项卡
var navLi = document.querySelectorAll('.coffee_top .col-md-4 ul li');
var main = document.querySelectorAll('.product');
for(var i = 0; i < navLi.length; i++){
	navLi[i].index = i;
	navLi[i].onclick = function(){
		for(var j = 0; j < navLi.length; j++){
			navLi[j].classList.remove('active');
			main[j].classList.remove('active');
		}
		this.classList.add('active');
		main[this.index].classList.add('active');
	}
}
